(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as anonymous module.
        define('ChineseDistricts', [], factory);
    } else {
        // Browser globals.
        factory();
    }
})(function () {
    var ChineseDistricts = null;
    $.ajaxSettings.async = false;
    $.getJSON($('#city_json_url').val(), function (data) {
        ChineseDistricts = data;
    });
    $.ajaxSettings.async = true;

    if (typeof window !== 'undefined') {
        window.ChineseDistricts = ChineseDistricts;
    }

    return ChineseDistricts;
});
